trim-x
This method removes whitespace from the left and right end of a string.
Version: 2.0.2
Author: Xotic750 Xotic750@gmail.com
License: MIT
Copyright: Xotic750
module.exports(string)
⇒ string
⏏
This method removes whitespace from the left and right end of a string.
Kind: Exported function
Returns: string
- The trimmed string.
Throws:
TypeError
If string is null or undefined or not coercible.
Param | Type | Description |
---|
string | string | The string to trim the whitespace from. |
Example
var trim = require('trim-x');
trim(' \t\na \t\n') === 'a';